import 'dart:convert';

import 'package:largefriends/entity/json/json_parse_utils.dart';

class LfRelationResultEntity {
  LfRelationResultEntity(
      {this.ret, this.likedCntToday = 0, this.sparkCntToday = 0});

  factory LfRelationResultEntity.fromJson(Map<dynamic, dynamic> jsonRes) =>
      LfRelationResultEntity(
        ret: jsonRes.asBool('ret', false),
        likedCntToday: jsonRes.asInt('likedCntToday', 0),
        sparkCntToday: jsonRes.asInt('sparkCntToday', 0),
      );

  bool? ret;
  int likedCntToday;
  int sparkCntToday;

  @override
  String toString() {
    return jsonEncode(this);
  }

  Map<String, dynamic> toJson() => <String, dynamic>{
        'ret': ret,
        'likedCntToday': likedCntToday,
        'sparkCntToday': sparkCntToday,
      };
}
